// -*- IDL -*-

// ================================================================
/**
 *  @file TAO_Ext.pidl
 *
 *  This file contains extensions to the TAO-specific idl interfaces
 *  (not part of CORBA  2.6) defined in $TAO_ROOT/tao
 *
 *  The steps to regenerate the code are as follows:
 *
 * 1. Run the tao_idl compiler on the pidl file.  The command used for
 *   this is:
 *
 *   tao_idl
 *       -o orig -Gp -Gd -GA -Sci -SS
 *       -Wb,export_macro=TAO_Messaging_Export
 *       -Wb,export_include=messaging_export.h
 *       -Wb,pre_include="ace/pre.h"
 *       -Wb,post_include="ace/post.h"
 *       -I$(TAO_ROOT) TAO_Ext.pidl
 *
 *   The generated files are ready to use
 */
// ================================================================

#ifndef TAO_TAO_EXT_IDL
#define TAO_TAO_EXT_IDL

#include "tao/Policy.pidl"
#include "tao/TimeBase.pidl"

#pragma prefix "tao"

module TAO
{
  const CORBA::PolicyType CONNECTION_TIMEOUT_POLICY_TYPE = 0x54410008;

  local interface ConnectionTimeoutPolicy : CORBA::Policy {
    readonly attribute TimeBase::TimeT relative_expiry;
  };

  //
  // Buffering constraint.
  //
  typedef unsigned short BufferingConstraintMode;
  const BufferingConstraintMode BUFFER_FLUSH         = 0x00;

  // Note that timeout, message_count, and message_bytes can be or'd.
  const BufferingConstraintMode BUFFER_TIMEOUT       = 0x01;
  const BufferingConstraintMode BUFFER_MESSAGE_COUNT = 0x02;
  const BufferingConstraintMode BUFFER_MESSAGE_BYTES = 0x04;

  struct BufferingConstraint
  {
    BufferingConstraintMode mode;
    TimeBase::TimeT timeout;
    unsigned long message_count;
    unsigned long message_bytes;
  };

  const CORBA::PolicyType BUFFERING_CONSTRAINT_POLICY_TYPE = 0x54410001;

  local interface BufferingConstraintPolicy : CORBA::Policy
    {
      readonly attribute BufferingConstraint buffering_constraint;
    };
};

#endif /* TAO_TAO_EXT_IDL */
